<template>
  <a-badge :count="count" :numberStyle="numberStyle" />
</template>

<script>
export default {
  name: 'DBadge',
  props: {
    count: {
      type: [Number, String],
      required: true
    },
    backgroundColor: {
      type: String
    },
    color: {
      type: String
    }
  },
  computed: {
    numberStyle() {
      return {
        backgroundColor: this.backgroundColor,
        color: this.color
      };
    }
  }
};
</script>

<style lang="scss" scoped>
::v-deep .tw-badge-count {
  padding: 0 10px;
  border-radius: 2px;
  font-size: 12px;
}
</style>
